﻿<Application x:Class="Squiggle.UI.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Windows\MainWindow.xaml" Startup="Application_Startup" Exit="Application_Exit">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources\Translation.xaml"/>
                <ResourceDictionary Source="/PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\themes/aero.normalcolor.xaml" />
                <ResourceDictionary Source="Resources\ComboBoxResource.xaml"/>
                <ResourceDictionary Source="Resources\GlassButton.xaml"/>
                <ResourceDictionary Source="Resources\RoundButton.xaml" />
                <ResourceDictionary>
                    <Style x:Key="CloseButtonStyle" TargetType="{x:Type Button}">
                        <Setter Property="Margin" Value="2" />
                        <Setter Property="Cursor" Value="Hand" />
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate>
                                    <Image Width="14" Height="14" Source="/Images/remove.png" />
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style TargetType="ToolTip" x:Key="BuddyToolTip">
                        <Setter Property="Placement" Value="Left" />
                        <Setter Property="Content" Value="{Binding}" />
                        <Setter Property="ContentTemplate">
                            <Setter.Value>
                                <DataTemplate>
                                    <Border Margin="5">
                                        <Grid>
                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="0.3*"/>
                                                <RowDefinition Height="Auto"/>
                                            </Grid.RowDefinitions>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="0.3*"/>
                                                <ColumnDefinition Width="0.7*"/>
                                            </Grid.ColumnDefinitions>
                                            <TextBlock VerticalAlignment="Top" Text="Contact" Foreground="Black" FontWeight="Bold"/>
                                            <Image Grid.Row="1" Margin="5" Width="100" Height="100" Stretch="UniformToFill">
                                                <Image.Style>
                                                    <Style TargetType="Image">
                                                        <Setter Property="Source" Value="{Binding Properties.DisplayImage}" />
                                                        <Style.Triggers>
                                                            <DataTrigger Binding="{Binding Properties.DisplayImage}" Value="{x:Null}">
                                                                <Setter Property="Source" Value="Images\man.png" />
                                                            </DataTrigger>
                                                        </Style.Triggers>
                                                    </Style>
                                                </Image.Style>
                                            </Image>
                                            <StackPanel VerticalAlignment="Center" Orientation="Vertical" Grid.Column="1" Grid.Row="1">
                                                <TextBlock Foreground="Black" Text="{Binding DisplayName, StringFormat={StaticResource BuddyProps_DisplayName}}"/>
                                                <TextBlock Foreground="Black" Text="{Binding Status, StringFormat={StaticResource BuddyProps_Status}}"/>
                                                <TextBlock Foreground="Black" Text="{Binding Properties.EmailAddress, StringFormat={StaticResource BuddyProps_EmailAddress}}"/>
                                                <TextBlock Foreground="Black" Text="{Binding Properties.MachineName, StringFormat={StaticResource BuddyProps_MachineName}}" />
                                                <TextBlock Foreground="Black" Text="{Binding Properties.GroupName, StringFormat={StaticResource BuddyProps_GroupName}}" />
                                                <TextBlock Foreground="Black" Text="{Binding LastUpdated, StringFormat={StaticResource BuddyProps_LastUpdated}}" />
                                            </StackPanel>
                                        </Grid>
                                    </Border>
                                </DataTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <LinearGradientBrush x:Key="ContactBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FFF0F0F0" Offset="0.061"/>
                        <GradientStop Color="#FFE3E4E4" Offset="0.939"/>
                    </LinearGradientBrush>
                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
</Application>
